﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yunwei.Domain.Models;

namespace Yunwei.IBizLogic
{
    public interface IStaffService : IBaseService<Staff>
    {
        /// <summary>
        /// 查询数据列表
        /// </summary>
        /// <param name="number">返回记录数量</param>
        /// <param name="name">标题</param>
        /// <param name="restaurant_Id">餐馆ID</param>
        /// <param name="orderCode">排序码</param>
        /// <returns>数据列表</returns>
        IQueryable<Staff> FindList(int number, string name, int job, int restaurant_Id, int orderCode);

        /// <summary>
        /// 用户列表
        /// </summary>
        /// <param name="pageIndex">页码数</param>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="name">标题</param>
        /// <param name="restaurant_Id">餐馆ID</param>
        /// <param name="totalRecord">总记录数</param>
        /// <param name="order">排序：0-ID升序（默认），1ID降序，2注册时间升序，3注册时间降序，4登录时间升序，5登录时间降序</param>
        /// <returns></returns>
        IQueryable<Staff> FindPageList(out int totalRecord, int pageIndex, int pageSize, string name, int job, int restaurant_Id, int order);

        /// <summary>
        /// 排序
        /// </summary>
        /// <param name="entitys">数据实体集</param>
        /// <param name="roderCode">排序代码[默认：ID降序]</param>
        /// <returns></returns>
        IQueryable<Staff> Order(IQueryable<Staff> entitys, int orderCode);
    }
}
